<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
		<meta charset="UTF-8">
		<title>文章管理</title>
		<!--jQuery-->
		<script type="text/javascript" src="/jQuery/jquery.js"></script>
		<!--easyUI-->
		<link rel="stylesheet" type="text/css" href="/easyUI/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="/easyUI/themes/icon.css">
		<script type="text/javascript" src="/easyUI/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="/easyUI/locale/easyui-lang-zh_CN.js"></script>
		<!--layer弹出框-->
		<script type="text/javascript" src="/layer/layer.js"></script>
		<script type="text/javascript" src="/lqStrap/easyUIStrengthen.js"></script>
		<!--local-->
		<script type="text/javascript" th:src="@{/page/articleManager.js}"></script>

</head>
<body>

<!--学习参考：
http://www.92ui.net/
http://www.jeasyui.net/plugins/181.html
http://layer.layui.com/
-->
<table id="gridBean" class="easyui-datagrid" title="文章管理"
			 data-options="singleSelect:true,
           collapsible:true,url:'/article/query.json',
           method:'get',
           rownumbers:true,//显示行号
           pagination:true,//显示分页卡，如果为true，则在DataGrid控件底部显示分页工具栏
           pageSize:10,//在设置分页属性的时候初始化页面大小
           toolbar:'#tb',
           footer:'#ft',
           onDblClickRow:gridBean_DblClickRow
        "
			 style="width:1000px;height:650px;">
		<thead>
		<tr>
				<th data-options="field:'id',width:40,hidden:true">主键</th>
				<th data-options="field:'title',width:100">主题</th>
				<th data-options="field:'categories',width:120">分类</th>
				<th data-options="field:'tags',width:100">标签</th>
				<th data-options="field:'allowComment',width:100">是否允许评论</th>
				<th data-options="field:'content',width:200">内容</th>
				<th data-options="field:'created',width:100,
            align: 'center',
            formatter: function (value) {
                var dateMat = new Date(value);
                var year = dateMat.getFullYear();
                var month = dateMat.getMonth() + 1;
                var day = dateMat.getDate();
                return  year + '-' + month + '-' + day;
            }
				">创建日期
				</th>
				<th data-options="field:'modified',width:100,
            align: 'center',
            formatter: function (value) {
                var dateMat = new Date(value);
                var year = dateMat.getFullYear();
                var month = dateMat.getMonth() + 1;
                var day = dateMat.getDate();
                return  year + '-' + month + '-' + day;
            }
        ">修改日期
				</th>
				<th data-options="field:'thumbnail',width:100">缩略图</th>
		</tr>
		</thead>
</table>
<!--头部工具栏-->
<div id="tb" style="padding:2px 5px;text-align: right;">
		<a href="#" class="easyui-linkbutton" iconCls="icon-search"
			 onclick="searchBean()">查询</a>
</div>
<!--尾部工具栏-->
<div id="ft" style="padding:2px 5px;">
		<a href="#" class="easyui-linkbutton" iconCls="icon-add"
			 onclick="addHandler()" plain="true"></a>
		<a href="#" class="easyui-linkbutton" iconCls="icon-edit"
			 onclick="updateHandler()" plain="true"></a>
		<a href="#" class="easyui-linkbutton" iconCls="icon-remove"
			 onclick="deleteHandler()" plain="true"></a>
</div>

<!--新增-->
<div id="dlgBean" class="easyui-dialog"
		 data-options="iconCls:'icon-add',
        title:'新增用户信息',
        closed:true,//默认隐藏
        modal:true
     "
		 style="width:400px;height:auto;padding:10px;">
		<form id="formBean">
				<div style="margin-bottom:20px">
						<input class="easyui-textbox" name="title" style="width:100%"
									 data-options="label:'主题:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-textbox" name="categories" style="width:100%"
									 data-options="label:'分类:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-textbox" name="tags" style="width:100%"
									 data-options="label:'标签:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-textbox" name="allowComment" style="width:100%"
									 data-options="label:'是否允许评论:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-textbox" name="thumbnail" style="width:100%"
									 data-options="label:'缩略图:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-textbox" name="content" style="width:100%"
									 data-options="label:'内容:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-datebox" name="created" style="width:100%"
									 data-options="label:'创建时间:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-datebox" name="modified" style="width:100%"
									 data-options="label:'修改时间:',required:true">
				</div>
		</form>
		<div style="text-align:center;padding:5px 0">
				<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()" style="width:80px">提交</a>
				<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()" style="width:80px">清空</a>
		</div>
</div>
<!--修改-->
<div id="dlgBean02" class="easyui-dialog"
		 data-options="iconCls:'icon-add',
        title:'修改用户信息',
        closed:true,//默认隐藏
        modal:true
     "
		 style="width:400px;height:auto;padding:10px;">
		<form id="formBean02">
				<div style="display: none;">
						<input class="easyui-textbox" name="id" style="width:100%"
									 data-options="label:'主键:'">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-textbox" name="id" style="width:100%"
									 data-options="label:'编号:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-textbox" name="title" style="width:100%"
									 data-options="label:'主题:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-textbox" name="categories" style="width:100%"
									 data-options="label:'分类:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-textbox" name="tags" style="width:100%"
									 data-options="label:'标签:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-textbox" name="allowComment" style="width:100%"
									 data-options="label:'是否允许评论:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-textbox" name="thumbnail" style="width:100%"
									 data-options="label:'缩略图:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-textbox" name="content" style="width:100%"
									 data-options="label:'内容:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-datebox" name="created" style="width:100%"
									 data-options="label:'创建时间:',required:true">
				</div>
				<div style="margin-bottom:20px">
						<input class="easyui-datebox" name="modified" style="width:100%"
									 data-options="label:'修改时间:',required:true">
				</div>
		</form>
		<div style="text-align:center;padding:5px 0">
				<a href="javascript:void(0)" class="easyui-linkbutton" onclick="updateSubmit()" style="width:80px">提交</a>
				<a href="javascript:void(0)" class="easyui-linkbutton" onclick="updateClear()" style="width:80px">清空</a>
		</div>
</div>


</body>
</html>
